<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />

		<link href="gongxiao.css" rel="stylesheet" />
		<style>
			.mui-bar-nav {
				box-shadow: none;
				background: #FF7234;
				text-align: center;
			}
			
			.mui-bar-nav img {
				height: 1.5rem;
				margin-top: .5rem
			}
			
			.mui-title {
				color: #FFFFFF;
			}
			
			.mui-bar a {
				color: #fff;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left backbtn"></a>
			<h1 class="mui-title">交易市场</h1>
		</header>
		<div class="bglogo">
			<img src="../images/mine9.png" width="20%" />
			<p></p>
		</div>

		<button type="button" class="mui-btn mui-btn-yellow mui-btn-block">授权登录</button>

	</body>
	<script type="text/javascript" src="../lib/mui.js"></script>
	<script type="text/javascript" src="../lib/jquery-1.11.0.js"></script>
	<script type="text/javascript" src="../lib/service.js"></script>
	<script>
		mui.init()
		mui.plusReady(function() {
			
				console.log(localStorage.getItem('userinfo'))
				if(localStorage.getItem('userinfo') != null) {
					var data = localStorage.getItem('userinfo');
					var userinfo = JSON.parse(data);
					$('.bglogo p').html(userinfo.phone)
					if(userinfo.auditFlag != 3){
						$('.mui-btn-block').hide();
						mui.toast("您还不是供销会员")
					}
				}
			$('.mui-btn-block').bind('tap', function() {
				plus.nativeUI.showWaiting()
				getServer('app/member/gxLogin', "", function(res) {
					plus.nativeUI.closeWaiting()
					console.log(JSON.stringify(res))
					//				console.log(res.data.code)
					var url = {
						url :res.data.authUrl
					}
					openurl('../home/gongxiaoDetatal.html', JSON.stringify(url))
				});
			})

		})
	</script>

</html>